

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>JAEGER- DISTRIBUTED TRACING &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/css/custom.css" type="text/css" />

  
  
    <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></script>
        <script src="../../../_static/jquery.js"></script>
        <script src="../../../_static/underscore.js"></script>
        <script src="../../../_static/doctools.js"></script>
    
    <script type="text/javascript" src="../../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../../genindex/" />
    <link rel="search" title="Search" href="../../../search/" />
    <link rel="next" title="Ceph 内幕" href="../../internals/" />
    <link rel="prev" title="Ceph Dashboard Design Goals" href="../../dashboard/ui_goals/" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    

















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../../../" class="icon icon-home"></a> &raquo;</li>
        
          <li><a href="../">向 Ceph 贡献：开发者指南</a> &raquo;</li>
        
      <li>JAEGER- DISTRIBUTED TRACING</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="../../../_sources/dev/developer_guide/jaegertracing.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../../">
          

          
            
            <img src="../../../_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../../start/intro/">Ceph 简介</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../architecture/">体系结构</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../">开发者指南</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../intro/">简介</a></li>
<li class="toctree-l2"><a class="reference internal" href="../essentials/">必备知识</a></li>
<li class="toctree-l2"><a class="reference internal" href="../merging/">何时、合并了什么</a></li>
<li class="toctree-l2"><a class="reference internal" href="../issue-tracker/">问题追踪器</a></li>
<li class="toctree-l2"><a class="reference internal" href="../basic-workflow/">基本工作流</a></li>
<li class="toctree-l2"><a class="reference internal" href="../tests-unit-tests/">测试：单元测试</a></li>
<li class="toctree-l2"><a class="reference internal" href="../testing_integration_tests/">测试：集成测试(Teuthology)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../running-tests-locally/">测试：在本地运行测试</a></li>
<li class="toctree-l2"><a class="reference internal" href="../dash-devel/">Ceph Dashboard 开发者文档 (之前是 HACKING.rst)</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Tracing 开发者文档</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#basic-architecture-and-terminology">BASIC ARCHITECTURE AND TERMINOLOGY</a></li>
<li class="toctree-l3"><a class="reference internal" href="#how-to-get-started-using-tracing">HOW TO GET STARTED USING TRACING?</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../cephadm/">Cephadm 开发者文档</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <div class="section" id="jaeger-distributed-tracing">
<h1>JAEGER- DISTRIBUTED TRACING<a class="headerlink" href="#jaeger-distributed-tracing" title="Permalink to this headline">¶</a></h1>
<p>Jaeger + Opentracing provides ready to use tracing services for distributed
systems and is becoming the widely used standard because of their simplicity and
standardization.</p>
<p>We use a modified <a class="reference external" href="https://github.com/ceph/jaeger-client-cpp">jaeger-cpp-client</a> the backend provided to the
Opentracing API, which is responsible for the collection of spans, these spans
are made with the use of smart pointers that carry the timestamp, TraceID and other
meta info like a specific tag/log associated with the span to uniquely identify
it across the distributed system.</p>
<div class="section" id="basic-architecture-and-terminology">
<h2>BASIC ARCHITECTURE AND TERMINOLOGY<a class="headerlink" href="#basic-architecture-and-terminology" title="Permalink to this headline">¶</a></h2>
<p>refer to the <a class="reference external" href="../../../jaegertracing/#basic-architecture-and-terminology">Ceph Tracing documentation</a></p>
</div>
<div class="section" id="how-to-get-started-using-tracing">
<h2>HOW TO GET STARTED USING TRACING?<a class="headerlink" href="#how-to-get-started-using-tracing" title="Permalink to this headline">¶</a></h2>
<p>Enabling jaegertracing with Ceph needs deployment Jaeger daemons + compiling
Ceph with Jaeger, orchestrated to be used in vstart cluster for developers, this
uses a jaeger <a class="reference external" href="https://www.jaegertracing.io/docs/1.22/getting-started/#all-in-one">all-in-one docker</a> which
isn’t recommended for production, but for testing purposes. Let’s look at all the
steps needed:</p>
<blockquote>
<div><ol class="arabic">
<li><p>Update system with Jaeger dependencies, using install-deps:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ WITH_JAEGER=true ./install-deps.sh
</pre></div>
</div>
</li>
<li><p>Compile Ceph with Jaeger enabled:</p></li>
</ol>
<blockquote>
<div><ul>
<li><p>for precompiled build:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cd build
$ cmake -DWITH_JAEGER=ON ..
</pre></div>
</div>
</li>
<li><p>for fresh compilation using do_cmake.sh:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ ./do_cmake.sh -DWITH_JAEGER=ON &amp;&amp; ninja vstart
</pre></div>
</div>
</li>
</ul>
</div></blockquote>
<p>3. After successful compiling, start a vstart cluster with <cite>–jaeger</cite> which
will deploy <a class="reference external" href="https://www.jaegertracing.io/docs/1.20/getting-started/#all-in-one">jaeger all-in-one</a>
using container deployment services(docker/podman):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ MON=1 MGR=0 OSD=1 ../src/vstart.sh --with-jaeger
</pre></div>
</div>
<p>if the deployment is unsuccessful, you can deploy <a class="reference external" href="https://www.jaegertracing.io/docs/1.20/getting-started/#all-in-one">all-in-one</a>
service manually and start vstart cluster without jaeger as well.</p>
<ol class="arabic" start="4">
<li><p>Test the traces using rados-bench write:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ bin/rados -p test bench 5 write --no-cleanup
</pre></div>
</div>
</li>
</ol>
</div></blockquote>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><cite>using-jaeger-cpp-client-for-distributed-tracing-in-ceph &lt;https://medium.com/&#64;deepikaupadhyay/using-jaeger-cpp-client-for-distributed-tracing-in-ceph-8b1f4906ca2&gt;</cite></p>
</div>
</div>
</div>



           </div>
           
          </div>
          <footer>
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
        <a href="../../internals/" class="btn btn-neutral float-right" title="Ceph 内幕" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
        <a href="../../dashboard/ui_goals/" class="btn btn-neutral float-left" title="Ceph Dashboard Design Goals" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>
        &#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).

    </p>
  </div> 

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>